package com.ocm.tourism.core.user;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ocm.tourism.core.domain.Business;
import com.ocm.tourism.core.domain.CulinaryCulture;
import com.ocm.tourism.core.domain.FoodStall;
import com.ocm.tourism.core.domain.Hotel;

@Service("businessServiceClient")
public class BusinessServiceClientImpl implements BusinessServiceClient {

   @Autowired
   private DispatchService dispatchService;

   public Business findBusiness(long businessId){
      Business business = this.dispatchService.getTourismService().findBusiness(businessId);
      return business;
   }

   @Override
   public long countHotels() {
      long count = this.dispatchService.getTourismService().countHotels();
      return count;
   }

   @Override
   public List<Hotel> findHotels(int firstResult, int sizeNo) {
      List<Hotel> hotels = this.dispatchService.getTourismService().findHotels(firstResult, sizeNo);
      return hotels;
   }

   @Override
   public boolean validatedAcceptBusiness(long businessId) {
      boolean result = this.dispatchService.getTourismService().validatedAcceptBusiness(businessId);
      return result;
   }

   @Override
   public long countRestaurants() {
      long count = this.dispatchService.getTourismService().countRestaurants();
      return count;
   }

   @Override
   public List<CulinaryCulture> findRestaurants(int firstResult, int sizeNo) {
      List<CulinaryCulture> restaurants = this.dispatchService.getTourismService().findRestaurants(firstResult, sizeNo);
      return restaurants;
   }

   @Override
   public long countCoffees() {
      long count = this.dispatchService.getTourismService().countCoffees();
      return count;
   }

   @Override
   public List<CulinaryCulture> findCoffees(int firstResult, int sizeNo) {
      List<CulinaryCulture> coffees = this.dispatchService.getTourismService().findCoffees(firstResult, sizeNo);
      return coffees;
   }

   @Override
   public long countFoodStalls() {
      long count = this.dispatchService.getTourismService().countFoodStalls();
      return count;
   }

   @Override
   public List<FoodStall> findFoodStalls(int firstResult, int sizeNo) {
      List<FoodStall> foodStalls = this.dispatchService.getTourismService().findFoodStalls(firstResult, sizeNo);
      return foodStalls;
   }

   @Override
   public long countTouristAgencies() {
      long count = this.dispatchService.getTourismService().countTouristAgencies();
      return count;
   }

   @Override
   public List<Business> findTouristAgencies(int firstResult, int sizeNo) {
      List<Business> businesses = this.dispatchService.getTourismService().findTouristAgencies(firstResult, sizeNo);
      return businesses;
   }
}
